<!DOCTYPE html>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" %>
<%@ include file="../core/core.jsp" %>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>修改商品</title>
    <meta name="keywords" content="叮当猫">
    <meta name="description" content="叮当猫">
    <link href="../static/css/summernote.css" rel="stylesheet">
    <link href="../static/css/summernote-bs3.css" rel="stylesheet">
    <link href="../static/css/cropper.min.css" rel="stylesheet">
    <link href="../static/css/sitelogo.css" rel="stylesheet">
    <link rel="stylesheet" href="../static/css/artEditor.css">
    <link rel="stylesheet" href="../static/zyupload/skins/zyupload-1.0.0.min.css " type="text/css">
<%-- <script type="text/javascript" src="../static/zyupload/jquery-1.7.2.js"></script>--%>
    <script type="text/javascript" src="../static/zyupload/zyupload.drag-1.0.0.min.js"></script>
    <script src="../static/js/photoClip/cropper.js"></script>
    <script src="../static/js/photoClip/sitelogo.js"></script>
    <style>
        #clipArea {
            margin: 20px;
            height: 300px;
        }

        #file,
        #clipBtn {
            margin: 20px;
        }

        #view {
            margin: 0 auto;
            width: 200px;
            height: 200px;
        }

        table.dataTable thead .sorting:after {
            content: '';
        }

        .editDetail, #editState, #keepState, #editInventory, #saveInventory, .editAll {
            background-color: #49c9bb;
            color: #FFFFFF;
            display: inline-block;
            padding: 6px 12px;
            font-size: 14px;
            font-weight: 400;
            line-height: 1.42857143;
            text-align: center;
            vertical-align: middle;
            cursor: pointer;
            border-radius: 4px;
            margin-top: 10px;
            white-space: nowrap;
        }

        #editState, #keepState, #editInventory, #saveInventory {
            margin-top: 0;
        }

        .spe_title input, .spe_detail input {
            margin-right: 27px;
            margin-bottom: 10px;
        }

        .spe_title img {
            position: absolute;
            top: -10px;
            right: -11px;
            width: 24px;
            height: 24px;
        }

        .spe_detail img {
            position: absolute;
            top: -10px;
            right: 12px;
            width: 24px;
            height: 24px;
        }

        input[type=checkbox] {
            width: 18px;
            height: 18px;
            margin: 0 20px 0 4px;
            vertical-align: middle;
        }
        .delItem{
            cursor: pointer;
            text-decoration: underline;
        }
        .oneImgBox,.oneImgBox2{
            position: relative;
            width: 80px;
            height: 66px;
            margin-right: 10px;
            float: left;
        }
        .oneImgBox img,.oneImgBox2 img{
            width: 66px;
            height: 66px;
            display: block;
        }
        .oneImgBox span,.oneImgBox2 span{
            width: 18px;
            height: 18px;
            font-size: 18px;
            line-height: 18px;
            position: absolute;
            top:0;
            right: 0;
            cursor: pointer;
        }
    </style>
</head>

<body>
<%--
<div class="btn btn-primary" style="margin: 21px 0 0 48px;" id="editAll">修改商品信息</div>

<div class="btn btn-primary" style="margin: 21px 0 0 15px;display: none;" id="addSpe" data-toggle="modal" data-target="#avatar-modal6">添加规格信息</div>
<div class="btn btn-primary" style="margin: 21px 0 0 15px;display: none;" id="editSpe" data-toggle="modal" data-target="#avatar-modal7">修改规格信息</div>
--%>
<div class="wrapper wrapper-content animated fadeInRight">
    <div id="idBox" style="display: none;"><%=request.getAttribute("id")%></div>
    <div class="ibox-content">
        <form class="form-horizontal m-t" id="commentForm">
            <div class="form-group">
                <label class="col-sm-1 control-label">商品名称：</label>
                <div class="col-sm-8">
                    <input id="name" name="name" type="text" class="form-control" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">商品简称：</label>
                <div class="col-sm-8">
                    <input id="sumary" type="text" class="form-control" name="email" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">商品说明：</label>
                <div class="col-sm-8">
                    <input id="goodsExplain" type="text" class="form-control" name="email" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">商品关键字：</label>
                <div class="col-sm-8">
                    <input id="keyWord" type="text" class="form-control" name="email" readonly>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-1 control-label">进货价：</label>
                <div class="col-sm-8">
                    <input id="purchasePrice" type="text" class="form-control" name="email" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">成本价：</label>
                <div class="col-sm-8">
                    <input id="costPrice" type="text" class="form-control" name="email" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">叮当价：</label>
                <div class="col-sm-8">
                    <input id="ddPrice" type="text" class="form-control" name="email" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">会员价：</label>
                <div class="col-sm-8">
                    <input id="memberPrice" type="text" class="form-control" name="email" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">是否保修：</label>
                <div class="col-sm-8">
                    <select name="" id="isWarranty" style="width: 100%;height: 34px;" readonly>
                        <option value="true">是</option>
                        <option value="false">否</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">是否有唯一码：</label>
                <div class="col-sm-8">
                    <select name="" id="isImie" style="width: 100%;height: 34px;" readonly>
                        <option value="true">是</option>
                        <option value="false">否</option>
                    </select>
                </div>
            </div>

            <div class="form-group" id="deliveryArea">
                <label class="col-sm-1 control-label">保修期限：</label>
                <div class="col-sm-8">
                    <input type="text" placeholder="请输入保修期限(月为单位，例：12)" id="warrantyPeriod" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">售后保障：</label>
                <div class="col-sm-8">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="ibox float-e-margins">
                                <div class="ibox-content no-padding" id="safeguard">

                                    <div class="summernote">

                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">详细参数：</label>
                <div class="col-sm-8">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="ibox float-e-margins">
                                <div class="ibox-content no-padding" id="parameter">

                                    <div class="summernote">

                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">商品主图：</label>
                <div class="col-sm-8">
                    <div id="imgBox">
                        <%--<img id="mainImg" src="../static/img/uploadImg.png" alt="img" style="width: 66px;height: 66px;">--%>
                    </div>
                    <button id="update" type="button" class="btn btn-primary" data-toggle="modal"
                            data-target="#avatar-modal" style="margin-bottom: 0px;margin-left: 15px;display: none;">
                        上传商品主图
                    </button>
                    <%--<div class="user_pic" style="margin: 0px;">--%>
                        <%--<img src=""/>--%>
                    <%--</div>--%>
                    <span>（大小为750*750）</span>
                </div>
            </div>
            <div class="form-group" id="detailBox">
                <label class="col-sm-1 control-label">商品图文详情：</label>
                <div class="publish-article-content col-sm-8">
                    <!-- 加载编辑器的容器 -->
                    <script id="container" name="content" type="text/plain">
                    </script>

                </div>
            </div>
        </form>

        <button type="button" class="btn btn-primary" id="save2"
                style="display: none;margin-left: 117px;margin-top: 15px;">保存修改
        </button>
        <div class="btn btn-primary" style="margin-left: 116px" id="editAll">修改商品信息</div>
        <div class="btn btn-primary" id="shangjia" style="display: none">上架</div>
        <div class="btn btn-primary" id="xiajia" style="display: none">下架</div>
    </div>


</div>

<!--sfy规格管理/规格内容管理/规格组合管理   -->
<div>
    <ul class="nav nav-tabs">
        <li class="liList active" id="guigetitle"><a showDiv="guigemianban">规格</a></li>
        <li class="liList" id="guigeneirongtitle"><a showDiv="guigeneirongmianban">规格内容</a></li>
        <li class="liList" id="guigezuhetitle"><a showDiv="guigezuhemianban">规格组合</a></li>
        <li class="liList" id="zezhifuwutitle" stateValue="1"><a showDiv="zengzhifuwumianban">增值服务</a></li>
        <li class="liList" id="shuxingtitle" stateValue="2"><a showDiv="shuxingmianban">商品属性</a></li>
        <li class="liList" id="chengnuotitle" stateValue="3"><a showDiv="chengnuomianban">服务承诺</a></li>
        <li class="liList" id="fenleititle" stateValue="4"><a showDiv="fenleimianban">商品分类</a></li>
        <li class="liList" id="fenqititle" stateValue="5"><a showDiv="fenqimianban">商品分期</a></li>
        <li class="liList" id="guigefenqititle" stateValue="6"><a showDiv="guigefenqimianban">商品规格分期</a></li>
        <li class="liList" id="miaoshatitle" stateValue="7"><a showDiv="miaoshamianban">秒杀</a></li>
    </ul>
</div>


<div class="bigBox">
    <!--sfy规格管理/规格内容管理/规格组合管理面板-->
    <div class="panel panel-default" id="guigemianban">
        <div class="panel-body">
            <!--添加规格按钮 -->
            <button type="button" class="btn btn-success" data-toggle="modal" data-target="#ggModal">添加规格</button>

            <!--sfy展示商品规格的table -->
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>规格名称</th>
                    <th>是否有效</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="guigetable">
                <%--   <tr >
                     <td>颜色</td>
                       <td>有效</td>
                       <td>2016/1/2</td>
                       <td>15981853632</td>
                   </tr>--%>
                </tbody>
            </table>
        </div>
    </div>
    <!-- sfy规格内容面板-->
    <div class="panel panel-default" id="guigeneirongmianban" style="display: none">
        <div class="panel-body" id="ggbjnrzs">


        </div>
    </div>
    <!-- sfy规格组合面板-->
    <div class="panel panel-default" id="guigezuhemianban" style="display: none">
        <div class="panel-body">
            <form class="form-horizontal m-t" id="commentForm2">

                <div class="form-group">
                    <label class="col-sm-1 control-label">规格组合：</label>
                    <div class="col-sm-6">
                        <select name="propertiesIds" id="spicificationZh" onchange="changeSpecification()"
                                style="height: 24px;margin-right: 5px;">
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-1 control-label">进货价：</label>
                    <div class="col-sm-8">
                        <input id="purchasePrice2" type="text" class="form-control" name="email">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-1 control-label">成本价：</label>
                    <div class="col-sm-8">
                        <input id="costPrice2" type="text" class="form-control" name="email">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-1 control-label">叮当价：</label>
                    <div class="col-sm-8">
                        <input id="ddPrice2" type="text" class="form-control" name="email">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-1 control-label">会员价：</label>
                    <div class="col-sm-8">
                        <input id="memberPrice2" type="text" class="form-control" name="email">
                    </div>
                </div>
                <span style="display: none" id="guigezuheid"></span>

                <div class="form-group">
                    <label class="col-sm-1 control-label">详细参数：</label>
                    <div class="col-sm-8">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="ibox float-e-margins">
                                    <div class="ibox-content no-padding" id="parameter2"><div class="summernote"></div></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-1 control-label">规格图片：</label>
                    <div class="col-sm-8">
                        <div class="user_pic" style="margin: 0px;" id="imgBox2">
                            <img id="mainImg2" src="../static/img/uploadImg.png" style="width: 66px;height: 66px;"/>
                        </div>
                        <button id="update2" type="button" class="btn btn-primary" data-toggle="modal"
                                data-target="#avatar-modal" style="margin-bottom: 0px;margin-left: 15px;">
                            上传规格图片
                        </button>
                    </div>
                    <span>（大小为230*230）</span>
                </div>

            </form>

            <button type="button" class="btn btn-primary" id="saveGoodsSpecification"
                    style="margin-left: 117px;margin-top: 15px;">添加
            </button>
            <button type="button" class="btn btn-primary" id="editGoodsSpecification"
                    style="margin-left: 117px;margin-top: 15px;">更新
            </button>

        </div>
    </div>

    <!--增值服务面板-->
    <div class="panel panel-default" id="zengzhifuwumianban" style="display: none;">
        <div class="panel-body">
            <!--添加增值服务按钮 -->
            <button type="button" class="btn btn-success" data-toggle="modal" data-target="#zengzhiModal"
                    id="addZengzhi">添加增值服务
            </button>

            <!--展示增值服务的table -->
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>增值服务id</th>
                    <th>增值服务名称</th>
                    <th>价格</th>
                    <th>有效期(单位/月)</th>
                </tr>
                </thead>
                <tbody id="zengzhitable" class="commonTable">
                <%--<tr>--%>
                <%--<td>id</td>--%>
                <%--<td>有效</td>--%>
                <%--<td>2016/1/2</td>--%>
                <%--<td>15981853632</td>--%>
                <%--</tr>--%>
                </tbody>
            </table>
        </div>
    </div>

    <!--属性面板-->
    <div class="panel panel-default" id="shuxingmianban" style="display: none;">
        <div class="panel-body">
            <!--添加属性按钮 -->
            <button type="button" class="btn btn-success" data-toggle="modal" data-target="#shuxingModal" id="addShuxing">添加商品属性</button>

            <!--展示属性的table -->
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>属性id</th>
                    <th>属性名称</th>
                </tr>
                </thead>
                <tbody id="shuxingtable" class="commonTable">
                <%--<tr>--%>
                <%--<td>id</td>--%>
                <%--<td>有效</td>--%>
                <%--</tr>--%>
                </tbody>
            </table>
        </div>
    </div>

    <!--服务承诺面板-->
    <div class="panel panel-default" id="chengnuomianban" style="display: none;">
        <div class="panel-body">
            <!--添加服务承诺按钮 -->
            <button type="button" class="btn btn-success" id="addChengnuo" data-toggle="modal" data-target="#chengnuoModal">添加服务承诺
            </button>

            <!--展示服务承诺的table -->
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>服务承诺id</th>
                    <th>服务承诺名称</th>
                </tr>
                </thead>
                <tbody id="fenleitable" class="commonTable">
                <%--<tr>--%>
                <%--<td>id</td>--%>
                <%--<td>有效</td>--%>
                <%--</tr>--%>
                </tbody>
            </table>
        </div>
    </div>

    <!--商品分类面板-->
    <div class="panel panel-default" id="fenleimianban" style="display: none;">
        <div class="panel-body">
            <!--添加商品分类按钮 -->
            <button type="button" class="btn btn-success" data-toggle="modal" id="addFenlei" data-target="#fenleiModal">添加商品分类</button>
            <!--展示商品分类的table -->
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>id</th>
                    <th>一级分类名称</th>
                    <th>二级分类名称</th>
                    <th>三级分类名称</th>
                </tr>
                </thead>
                <tbody id="chengnuotable" class="commonTable">
                <%--<tr>--%>
                <%--<td>id</td>--%>
                <%--<td>有效</td>--%>
                <%--</tr>--%>
                </tbody>
            </table>
        </div>
    </div>


    <!--商品分期面板-->
    <div class="panel panel-default" id="fenqimianban" style="display: none;">
        <div class="panel-body">
            <!--添加商品分类按钮 -->
            <button type="button" class="btn btn-success" data-toggle="modal" id="addFenqi" data-target="#fenqiModa5">添加商品分期</button>
            <!--展示商品分期的table -->
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>id</th>
                    <th>商品名称</th>
                    <th>分期金额</th>
                    <th>首付金额</th>
                    <th>分期月数</th>
                    <th>状态</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="fenqitable" class="commonTable">
                <%--<tr>--%>
                <%--<td>id</td>--%>
                <%--<td>有效</td>--%>
                <%--</tr>--%>
                </tbody>
            </table>
        </div>
    </div>


    <!--规格商品分期面板-->
    <div class="panel panel-default" id="guigefenqimianban" style="display: none;">
        <div class="panel-body">
            <!--展示规格商品分期的table -->
            <div class="form-group">
                <label class="col-sm-1 control-label">规格组合：</label>
                <div class="col-sm-6">
                    <select name="propertiesIds" id="spicificationZh2" onchange="getGuiGeFenQi()"
                            style="height: 24px;margin-right: 5px;">
                    </select>

                </div>
            </div>
            <div class="panel-body">
                <!--添加商品分类按钮 -->
                <button type="button" class="btn btn-success" data-toggle="modal" id="addGuigFenqi" data-target="#fenqiModa5">添加规格商品分期</button>
            </div>

            <table class="table table-hover">
                <thead>
                <tr>
                    <th>id</th>
                    <th>规格商品名称</th>
                    <th>分期金额</th>
                    <th>首付金额</th>
                    <th>分期月数</th>
                    <th>状态</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody id="guigefenqitable" class="commonTable">
                <%--<tr>--%>
                <%--<td>id</td>--%>
                <%--<td>有效</td>--%>
                <%--</tr>--%>
                </tbody>
            </table>
        </div>
    </div>
     <!--商品 秒杀面板-->
    <div class="panel panel-default" id="miaoshamianban" style="display: none;">
        <div class="panel-body">
            <div class="panel-body">
                <!--添加商品分类按钮 -->
                <button type="button" class="btn btn-success" data-toggle="modal" id="addmiaosha" data-target="#miaoshaModa">添加秒杀</button>
            </div>

            <table class="table table-hover">
                <thead>
                <tr>
                    <th>id</th>
                    <th>商品名称</th>
                    <th>规格</th>
                    <th>秒杀日期</th>
                    <th>原价</th>
                    <th>秒杀价</th>
                    <th>状态</th>
                    <th>总库存</th>
                    <th>库存</th>
                    <th>销量</th>
                </tr>
                </thead>
                <tbody id="miaoshatable" class="commonTable">

                </tbody>
            </table>
        </div>
    </div>
</div>



<!--sfy添加规格模态框 -->
<div class="modal fade" id="ggModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">添加规格</h4>
            </div>
            <div class="modal-body">

                <div class="form-group">
                    <label for="ggname">名称</label>
                    <input type="text" class="form-control" id="ggname" placeholder="例如：尺寸">
                </div>


                <button class="btn btn-info" id="ggsubmit">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!-- sfy编辑规格模态框-->
<div class="modal fade" id="ggbjModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabelbj">编辑规格</h4>
            </div>
            <div class="modal-body">

                <div class="form-group">
                    <label for="ggnamebj">规格名称</label>
                    <input type="text" class="form-control" id="ggnamebj">
                </div>
                <label for="name">选择是否有效</label>
                <select id="ggselect" class="form-control">
                    <option value=1>有效</option>
                    <option value=0>无效</option>
                </select>


                <button value="" class="btn btn-info" id="ggsubmitbj" onclick="ggbjsubmit(this)">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<div class="modal fade" id="bjFenQiModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div id="fenqiId" style="display: none;"></div>
            <div id="fenqidivid" style="display: none;"></div>
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabelbjFenQi">编辑分期</h4>
            </div>
            <div class="modal-body">

                <div class="form-group" id="specificationNamediv" style="display: none">

                    <label for="ggname">规格组合</label>
                    <input type="text" class="form-control" id="specificationName">
                </div>
                <div class="form-group" id="goodsNamediv" style="display: none">
                    <label for="ggname">商品名称</label>
                    <input type="text" class="form-control" id="goodsName" >
                </div>
                <div class="form-group">
                    <label for="ggname">首付金额</label>
                    <input type="text" class="form-control" id="prepayment1">
                </div>
                <div class="form-group">
                    <label for="ggname">分期月数</label>
                    <input type="text" class="form-control" id="periods1">
                </div>
                <div class="form-group">
                    <label for="ggname">分期金额</label>
                    <input type="text" class="form-control" id="instalmentAmount1">
                </div>
                <label for="name">选择是否有效</label>
                <select id="fenqiState" class="form-control">
                    <option value=1>有效</option>
                    <option value=0>无效</option>
                </select>

                <button class="btn btn-info" id="fenqiMd">提交修改</button>
            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!--修改规格弹框-->
<div class="modal fade" id="avatar-modal7" aria-hidden="true" aria-labelledby="avatar-modal-label" role="dialog"
     tabindex="-1">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h4 class="modal-title">修改商品规格</h4>
            </div>
            <div class="modal-body">
                <div class="spe_title" id="spe_title1" style="position: relative;"></div>
                <div class="spe_detail clearfix" id="specifcationContentName3" style="position: relative;">
                    <%--<input type="text" placeholder="大"><input type="text" placeholder="小">--%>
                    <%--<input type="text" placeholder="中"><input type="text" placeholder="">--%>
                    <%--<input type="text" placeholder=""><input type="text" placeholder="">--%>
                    <%--<input type="text" placeholder=""><input type="text" placeholder="">--%>
                </div>
                <div class="spe_title" id="spe_title2" style="position: relative;"></div>
                <div class="spe_detail clearfix" id="specifcationContentName4" style="position: relative;">
                    <%--<input type="text" placeholder="黑色"><input type="text" placeholder="白色">--%>
                    <%--<input type="text" placeholder="红色"><input type="text" placeholder="">--%>
                    <%--<input type="text" placeholder=""><input type="text" placeholder="">--%>
                    <%--<input type="text" placeholder=""><input type="text" placeholder="">--%>
                </div>
                <div class="edit_tips" style="color: #ff0000;">双击可修改当前规格</div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-white" data-dismiss="modal" id="close4">关闭</button>
                <button type="button" class="btn btn-primary" id="save4" style=";">保存</button>
            </div>
        </div>
    </div>
</div>
<!--sfy规格内容编辑弹框 -->
<div class="modal fade" id="ggnrbjModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabelggnrbj">编辑规格</h4>
            </div>
            <div class="modal-body">

                <div class="form-group">
                    <label for="ggrnnamebj">规格内容名称</label>
                    <input type="text" class="form-control" id="ggrnnamebj">
                </div>
                <label for="ggnrselect">选择是否有效</label>
                <select id="ggnrselect" class="form-control">
                    <option value=1>有效</option>
                    <option value=0>无效</option>
                </select>


                <button value="" class="btn btn-info" id="ggnrsubmitbj" onclick="ggnrbjsubmit(this)">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!--sfy规格内容增弹框-->
<div class="modal fade" id="ggnraddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="">添加规格内容</h4>
            </div>
            <div class="modal-body">

                <div class="form-group">
                    <label for="ggnrname">规格内容名称</label>
                    <input type="text" class="form-control" id="ggnrname" placeholder="例如：红色">
                </div>

                <button value="" class="btn btn-info" onclick="ggnraddsubmit(this)" id="ggnraddsubmit">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!--添加2模态框 -->
<div class="modal fade" id="shuxingModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title commonTitle">添加属性</h4>
            </div>
            <div class="modal-body">

                <div class="form-group" id="shuxingBox">
                    <label>名称</label><input class="checkBox" type="checkbox">
                    <label>名称</label><input class="checkBox" type="checkbox">
                    <label>名称</label><input class="checkBox" type="checkbox">
                </div>


                <button class="btn btn-info" id="shuxingAdd">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!--添加3模态框 -->
<div class="modal fade" id="chengnuoModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title commonTitle">添加服务承诺</h4>
            </div>
            <div class="modal-body">

                <div class="form-group" id="chengnuoBox">
                    <label>名称</label><input class="checkBox" type="checkbox">
                    <label>名称</label><input class="checkBox" type="checkbox">
                    <label>名称</label><input class="checkBox" type="checkbox">
                </div>


                <button class="btn btn-info" id="chengnuoAdd">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!--添加4模态框 -->
<div class="modal fade" id="fenleiModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title commonTitle">添加商品分类</h4>
            </div>
            <div class="modal-body">

                <div class="form-group">
                    <select name="" id="yijifenlei"></select>
                </div>
                <div class="form-group">
                    <select name="" id="erjifenlei" style="display: none"></select>
                </div>
                <div class="form-group">
                    <select name="" id="sanjifenlei" style="display: none;"></select>
                </div>

                <button class="btn btn-info" id="fenleiAdd">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<!--添加1模态框 -->
<div class="modal fade" id="zengzhiModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title commonTitle">添加增值服务</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label for="ggname">服务种类</label>
                    <select id="valueAddedServicesKind">
                        <option value="">请选择服务类型</option>
                        <option value="1">叮当网电池保服务</option>
                        <option value="2">叮当网进水保服务</option>
                        <option value="3">叮当网延长保修服务</option>
                        <option value="4">叮当网半价换新服务</option>
                        <option value="5">叮当网碎屏服务</option>
                        <option value="6">叮当网意外服务</option>
                        <option value="7">叮当网至尊保服务</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="ggname">名称</label>
                    <select id="zengzhiName">

                    </select>
                </div>
                <div class="form-group">
                    <label for="ggname">有效期(月)</label>
                    <input type="text" class="form-control" id="zengzhiTime">
                </div>

                <button class="btn btn-info" id="zengzhiAdd">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>




<!--添加5模态框 -->
<div class="modal fade" id="fenqiModa5" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title commonTitle">添加商品分期</h4>
            </div>
            <div class="modal-body">

                <div class="form-group" id="spicificationDiv" style="display: none">
                    <label for="ggname">规格组合</label>
                    <select id="spicificationZh3" >

                    </select>
                </div>
                <div class="form-group">
                    <label for="ggname">首付金额</label>
                    <input type="text" class="form-control" id="prepayment">
                </div>
                <div class="form-group">
                    <label for="ggname">分期月数</label>
                    <input type="text" class="form-control" id="periods">
                </div>
                <div class="form-group">
                    <label for="ggname">分期金额</label>
                    <input type="text" class="form-control" id="instalmentAmount">
                </div>

                <button class="btn btn-info" id="fenqiAdd">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!--添加6模态框 -->
<div class="modal fade" id="miaoshaModa" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top: 500px">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title commonTitle">添加秒杀</h4>
            </div>
            <div class="modal-body">

                <div class="form-group" id="spicificationDiv2" >
                    <label for="ggname">规格组合</label>
                    <select id="spicificationZh6" >

                    </select>
                </div>
                <div class="form-group">
                    <label for="ggname">库存</label>
                    <input type="text" class="form-control" id="inventory">
                </div>
                <div class="form-group">
                    <label for="ggname">秒杀日期</label>
                    <input type="date" class="form-control" id="seckillDate">
                </div>
                <div class="form-group">
                    <label for="ggname">秒杀价</label>
                    <input type="text" class="form-control" id="seckillPrice">
                </div>

                <button class="btn btn-info" id="miaoshaAdd">提交</button>

            </div>

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>



<div class="modal fade" id="avatar-modal" aria-hidden="true" aria-labelledby="avatar-modal-label" role="dialog"
     tabindex="-1">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width: 655px;height: 705px">

                <div class="modal-header">
                    <button class="close" data-dismiss="modal" type="button">&times;</button>
                    <h4 class="modal-title" id="avatar-modal-label">上传图片</h4>
                </div>
          <%--      <div class="modal-body">
                    <div class="avatar-body">
                        <div class="avatar-upload">
                            <input class="avatar-src" name="avatar_src" type="hidden">
                            <input class="avatar-data" name="avatar_data" type="hidden">
                            <label for="avatarInput" style="line-height: 35px;">图片上传</label>
                            <button class="btn btn-primary" type="button" style="height: 35px;"
                                    onclick="$('input[id=avatarInput]').click();">请选择图片
                            </button>
                            <span id="avatar-name"></span>
                            <input class="avatar-input hide" id="avatarInput" name="avatar_file" type="file"></div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="avatar-preview preview-lg" id="imageHead"
                                     style="width: 820px;height: 820px;"></div>
                                <!--<div class="avatar-preview preview-md"></div>
                        <div class="avatar-preview preview-sm"></div>-->
                            </div>
                            <div class="col-md-9">
                                <div class="avatar-wrapper"></div>
                            </div>
                        </div>
                        <div class="row avatar-btns">
                            <div class="col-md-4">
                                <div class="btn-group">
                                    <button class="btn btn-primary fa fa-undo" data-method="rotate" data-option="-90"
                                            type="button" title="Rotate -90 degrees"> 向左旋转
                                    </button>
                                </div>
                                <div class="btn-group">
                                    <button class="btn  btn-primary fa fa-repeat" data-method="rotate" data-option="90"
                                            type="button" title="Rotate 90 degrees"> 向右旋转
                                    </button>
                                </div>
                            </div>
                            <div class="col-md-5" style="text-align: right;">
                                <button class="btn btn-primary fa fa-arrows" data-method="setDragMode"
                                        data-option="move" type="button" title="移动">
							            <span class="docs-tooltip" data-toggle="tooltip" title=""
                                              data-original-title="$().cropper(&quot;setDragMode&quot;, &quot;move&quot;)">
							            </span>
                                </button>
                                <button type="button" class="btn btn-primary fa fa-search-plus" data-method="zoom"
                                        data-option="0.1" title="放大图片">
							            <span class="docs-tooltip" data-toggle="tooltip" title=""
                                              data-original-title="$().cropper(&quot;zoom&quot;, 0.1)">
							              <!--<span class="fa fa-search-plus"></span>-->
							            </span>
                                </button>
                                <button type="button" class="btn btn-primary fa fa-search-minus" data-method="zoom"
                                        data-option="-0.1" title="缩小图片">
							            <span class="docs-tooltip" data-toggle="tooltip" title=""
                                              data-original-title="$().cropper(&quot;zoom&quot;, -0.1)">
							              <!--<span class="fa fa-search-minus"></span>-->
							            </span>
                                </button>
                                <button type="button" class="btn btn-primary fa fa-refresh" data-method="reset"
                                        title="重置图片">
								            <span class="docs-tooltip" data-toggle="tooltip" title=""
                                                  data-original-title="$().cropper(&quot;reset&quot;)"
                                                  aria-describedby="tooltip866214">
                                            </span>
                                </button>
                            </div>
                            <div class="col-md-3">
                                <button class="btn btn-primary btn-block avatar-save fa fa-save" type="button" id="save"
                                        style=""> 保存修改
                                </button>
                            </div>
                        </div>
                    </div>
                </div>--%>
      <div id="zyupload" class="zyupload"></div>

      <script type="text/javascript">;
      var mainImageUrlAll ='';
      $(function(){
              // 初始化插件
              $("#zyupload").zyUpload({
                  width            :   "650px",                 // 宽度
                  height           :   "400px",                 // 宽度
                  itemWidth        :   "140px",                 // 文件项的宽度
                  itemHeight       :   "115px",                 // 文件项的高度
                  url              :   "/crm/uploadImage.do",  // 上传文件的路径
                  fileType         :   ["jpg","png","js","exe"],// 上传文件的类型
                  fileSize         :   51200000,                // 上传文件的大小
                  multiple         :   true,                    // 是否可以多个文件上传
                  dragDrop         :   true,                    // 是否可以拖动上传文件
                  tailor           :   false,                    // 是否可以裁剪图片
                  del              :   true,                    // 是否可以删除文件
                  finishDel        :   false,  				  // 是否在上传文件完成后删除预览
                  /* 外部获得的回调接口 */
                  onSelect: function(selectFiles, allFiles){    // 选择文件的回调方法  selectFile:当前选中的文件  allFiles:还没上传的全部文件
                      console.info("当前选择了以下文件：");
                      console.info(selectFiles);
                  },
                  onDelete: function(file, files){              // 删除一个文件的回调方法 file:当前删除的文件  files:删除之后的文件
                      console.info("当前删除了此文件：");
                      console.info(file.name);
                  },
                  onSuccess: function(file, response){// 文件上传成功的回调方法
                      console.info("此文件上传成功：");
                      console.info(file.name);
                      console.info("此文件上传到服务器地址：");
                      console.info(response);
                      var args = response.split("|");
                      mainImageUrlAll+=args[1]+",";
                      //铺出来上传成功后的图片
                      if(ifSpeImg=='false'){
                          $('#imgBox').append(
                              '<div class="oneImgBox"><img  src="'+args[1]+'" alt="img" ifShow="true" style="width: 66px;height: 66px;"><span>×</span></div>'
                          );
                      }else{
                          $('#imgBox2').empty();
                          $('#imgBox2').append('<div class="oneImgBox2"><img id="mainImg2" src="'+args[1]+'" alt="img" style="width: 66px;height: 66px;"><span class="del">×</span></div>')
                      }
                      $("#uploadInf").append("<p>上传成功，文件地址是：" + response + "</p>");
                  },
                  onFailure: function(file, response){          // 文件上传失败的回调方法
                      console.info("此文件上传失败：");
                      console.info(file.name);
                  },
                  onComplete: function(response){           	  // 上传完成的回调方法
                      console.info("文件上传完成");
                      console.info(response);
                  }
              });

          });

      </script>



    </div>
        </div>
</div>
<div class="loading" aria-label="Loading" role="img" tabindex="-1"></div>

<script src="../static/js/ajaxfileupload_v1.js"></script>
<script src="../static/js/photoClip/html2canvas.min.js" type="text/javascript" charset="utf-8"></script>
<!-- SUMMERNOTE -->
<script src="../static/js/plugins/summernote.min.js"></script>
<script src="../static/js/plugins/summernote-zh-CN.js"></script>
<script>
    $(document).ready(function () {

        $('.summernote').summernote({
            lang: 'zh-CN'
        });

    });
    var edit = function () {
        $("#eg").addClass("no-padding");
        $('.click2edit').summernote({
            lang: 'zh-CN',
            focus: true
        });
    };
    var save = function () {
        $("#eg").removeClass("no-padding");
        var aHTML = $('.click2edit').code(); //save HTML If you need(aHTML: array).
        $('.click2edit').destroy();
    };
</script>
<!-- 配置文件 -->
<script type="text/javascript" src="../static/js/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="../static/js/ueditor/ueditor.all.min.js"></script>
<script src="../static/js/goods/details.js" charset="utf-8"></script>
<script>
//    var ue = UE.getEditor('container', {
//        autoHeight: false,
//        initialFrameHeight:800
//    });
//    function getContent() {
//        var html = ue.getContent();
//        return html;
//    }
//    ue.addListener("ready", function () {
//        // editor准备好之后才可以使用  
//        u.setContent("<p>new text</p>");
//
//    });
</script>
</body>

</html>
